<?php
namespace app\admin\controller;
use app\admin\model\AuthModel;
use think\Db;
use think\Request;

class User extends Common
{
    protected function get_where()
    {
        $where = [];
        $key = Request::instance()->param('keyword');
        if($key != ''){
            $where['nickname'] = ['like','%'.$key.'%'];
        }
        return $where;
    }
    public function index_assign()
    {
        $model = new $this->_model;
        $total = $model->count();//总人数
        $verify = $model->where(['verify'=>1])->count();//已核销人数
        $sql = 'SELECT count(*) FROM rg_user_location  GROUP BY user_id  having count(user_id) > 1';
        $list = Db::query($sql);
        $zige = count($list);
        $wait = $zige - $verify;
        $this->assign('total',$total);
        $this->assign('verify',$verify);
        $this->assign('zige',$zige);
        $this->assign('wait',$wait);
    }
}
